package com.mail.portal.modular.service.impl;

import com.mail.portal.modular.mapper.ProductMapper;
import com.mail.portal.modular.model.Product;
import com.mail.portal.modular.service.IProductService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 创建人： Shi Heng
 * 创建时间：2018-04-03 19:08
 * QQ：374696376
 * Description：
 */
@Service
public class ProductServiceImpl implements IProductService {

    @Resource
    ProductMapper productMapper;

    @Override
    public Product selectByPrimaryKey(Object id) {
        return productMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Product> selectAll() {
        return productMapper.selectAll();
    }

    @Override
    public List<Map<String, Object>> list(String condition) {
        return productMapper.list(condition);
    }


    @Override
    public List<Product> selectProducts(String title, String beginTime, String endTime, Integer product_category_id) {
        return productMapper.selectProducts(title,beginTime,endTime,product_category_id);
    }
}
